<!--
CSS3的新布局模式
为了适应不同屏幕大小采取的布局行为,控制盒子摆放的方向、大小等
dispaly:flex;开启这种模式
flex/flex-grow：设置占等分比的权值
flex-direction: row;盒子排列的方向控制：
row、row-reverse、column、column-reverse
优先级大于width、height、margin、padding

-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        .container{
            width: 500px;
            height: 500px;
            background-color: #555;
            display:flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
        }

        .box1{
            width: 100px;
            height: 100px;
            background-color: red;
            flex:3;
        }

        .box2{
            width: 100px;
            height: 100px;
            background-color: green;
            flex:1;
        }

        .box3{
            width: 100px;
            height: 100px;
            background-color: blue;
            flex:1;
        }

    </style>
</head>

<body>
    <div class="container">
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box3"></div>
    </div>
    
</body>
</html>